<template>
  <div>
    <el-dialog title='查看' :visible="showDialog" width="30%" :before-close="handleClose" :close-on-click-modal="false">
      <el-form :model="form" ref="ruleForm" label-width="100px" class="demo-ruleForm">
        <el-form-item label="农场">{{ form.farmName }}</el-form-item>
        <el-form-item label="生产队">{{ form.teamName }}</el-form-item>
        <el-form-item label="补单类型">{{ form.orderType }}</el-form-item>
        <el-form-item label="申请时间">{{ form.createTime }}</el-form-item>
        <el-form-item label="审核时间">{{ form.updateTime }}</el-form-item>
        <el-form-item label="补单原因">
          <el-input type="textarea" v-model="form.orderWhy" placeholder="请输入补单原因" :disabled="true"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog1-footer">
        <el-button size="mini" class="cancel" @click="handleClose">取 消</el-button>
        <el-button size="mini" class="addButton" type="primary" @click="handleSubmit">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: ['showDialog'],

  data() {
    return {
      form: {},
    };
  },
  methods: {
    handleClose() {
      this.$emit('update:showDialog', false)
      this.form = {}
    },
    async handleSubmit() {
      this.handleClose()
    },
  }
}
</script>

<style lang='scss' scoped>
.dialog1-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 0 20px;
}

.el-form {
  padding: 0;
}

.cancel {
  border-radius: 5px;
  position: relative;
  line-height: 20px;
  text-align: center;
  font-size: 14px;

  &:hover,
  &:focus {
    background: rgba($color: #e8f4ff, $alpha: 1) !important;
    border: 1px solid #0e7b67 !important;
    color: #0e7b67 !important;
  }

}
</style>
